<%- include('../header.html')%>
<link href="../stylesheets/font-awesome.min.css" rel="stylesheet"/>
<link href="../template/assets/glyphicons/css/glyphicons.css" rel="stylesheet"/>
<link href="../stylesheets/summernote.css" rel="stylesheet"/>
<link href="../stylesheets/select2.css" rel="stylesheet"/>
<style>
    .portlet-title {
        border: 0 !important;
    }

    .img_thumbnailDiv {
        display: inline-block;
    }

    .img_thumbnail {
        width: 150px;
        padding: 5px;
        border: 1px solid #e5e5e5
    }

    #inputFile_sellerImg {
        line-height: 25px;
        opacity: 0;
        margin-left: -160px;
        cursor: pointer;
    }

    .downloadFile {
        position: relative;
        left: -21px;
        top: -70px;
        padding: 0px 3px;
    }

    #detailEditor .btn-group {
        margin: 5px 5px 5px 0 !important;
    }

    .checkbox input[type="checkbox"] {
        margin-left: 0;
    }
</style>
<div class="page-content">
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <h3 class="page-title">
                </h3>
                <ul class="breadcrumb">
                    <li>
                        <i class="icon-home"></i>
                        <a id="mainModule" href="/homepage">商品管理</a>
                        <i class="icon-angle-right"></i>
                    </li>
                </ul>
            </div>
        </div>
        <div id="dashboard">
            <div id="list_container" class="row-fluid">
                <div class="span12">
                    <div class="portlet box blue tabbable">
                        <div class="portlet-title">
                            <div class="portlet-title">
                                <h4 class="span2">
                                    <i class="icon-reorder"></i>
                                    <span class="hidden-480">商品列表</span>
                                    &nbsp;
                                </h4>

                               <!-- <div style="float: left;margin-left: 10px;">
                                    品牌：
                                    <select id="goodsBrand_query" style="width: 200px;"></select>
                                </div>-->

                                <div style="float: left;margin-left: 30px;">
                                    状态：
                                    <select id="flowState_query">
                                        <option value="0">全部</option>
                                        <option value="1">未提交审核</option>
                                        <option value="2">审核中</option>
                                        <option value="3">审核通过</option>
                                        <option value="4">审核不通过</option>
                                        <option value="5">二次审核</option>
                                    </select>
                                </div>

                                <div style="float: left;margin-left: 30px;">
                                    <input id="queryKeyStr" placeholder="请输入商品组名称或编码">
                                    <button id="btnQueryGoods" class="btn btn-primary" style="margin-left: 20px">查询
                                    </button>
                                </div>

                            </div>
                        </div>
                        <div class="portlet-body" style="margin-top: -5px;">
                            <div id="listTBody">

                            </div>

                            <div class="row-fluid">
                                <div class="span12">
                                    <div class="dataTables_paginate paging_bootstrap pagination">
                                        <ul>
                                            <li class="pre"><a id="btnFirstPage" href="javascript:void(0);">首页</a></li>
                                            <li class="prev"><a id="btnPrePage" href="javascript:void(0);">← 上一页</a></li>
                                            <li>
                                                <select id="pagingSelect">

                                                </select>
                                            </li>
                                            <li class="next" id="btnNextPage"><a href="javascript:void(0);">下一页 → </a></li>
                                            <li class="disabled"><a href="javascript:void(0);">共 <span id="totalPageNum" style="color: #005580">1</span> 页</a></li>
                                            <li class="next"><a id="btnLastPage" href="javascript:void(0);">末页</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
</div>
<script>
    var goodsOption='<%=goodsOption%>';
</script>
<%- include('../footer.html')%>
<script type="text/javascript" src="../javascripts/utils/select2.js"></script>
<script type="text/javascript" src="../javascripts/utils/common.js"></script>
<script type="text/javascript" src="../javascripts/utils/ejs.js"></script>
<script type="text/javascript" src="../javascripts/utils/layer/layer.js"></script>
<script type="text/javascript" src="../javascripts/utils/summernote.js"></script>
<script type="text/javascript" src="../javascripts/utils/summernote-zh-CN.js"></script>
<script type="text/javascript" src="../javascripts/config.js"></script>
<script type="text/javascript" src="../javascripts/utils/pagingControl.js"></script>
<script type="text/javascript" src="../javascripts/goods/mgr.js"></script>

<script type="text/html" id="goods_list_table">
    [% for(var i=0;i<list.length;i++){%]
    [%if((i+1)%4==1){%]
    <div class="row-fluid">
        [%}%]
        <div class="span3" >
            <div class="item" style="border: 1px solid #cccccc;min-height: 300px" data-id="[%=list[i].Id%]">
                <a class="fancybox-button " data-id="[%=list[i].Id%]"
                   href="/goods/verify?goodsGroupId=[%=list[i].Id%]&queryKeyStr=[%=queryKeyStr%]&flowState=[%=flowState%]&brandId=[%=brandId%]&pageIndex=[%=pageIndex%]">
                    <div class="zoom">
                        <img src="[%=list[i].imgPaths[0]%]" onError="this.src='/template/assets/img/logo.png'" alt="bbxvip"/>
                    </div>
                </a>
                <div style="display: inline-block">
                    <span class="icon"><i class="icon-paper-clip">[%=list[i].goodsGroupTitle%]</i></span>
                    <br/>
                    <span class="icon"><i class="icon-link">
                        [%if(list[i].addedState==0){%]
                            [%if(list[i].State==1){%]
                            未提交审核
                            [%}else if(list[i].State==2){%]
                            审核中
                            [%}else if(list[i].State==4){%]
                            审核不通过
                            [%}%]
                        [%}else if(list[i].addedState==1){%]
                            [%if(list[i].State==2){%]
                            二次审核
                            [%}else if(list[i].State==3){%]
                            审核通过
                            [%}else if(list[i].State==4){%]
                            二次审核不通过
                            [%}%]
                        [%}else if(list[i].addedState==2){%]
                        已下架
                        [%}%]
                    </i></span>

                </div>
            </div>
        </div>
        [%if((i+1)%4==0){%]
    </div>
    [%}%]
    [% }%]
</script>